package day3.demo2;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/day3/demo2")
public class MyCtr {
    @GetMapping("/a1")
    public String a1(){
        int a = 1/0;
        return "hello,a1";
    }
    @GetMapping("/a2")
    public String a2(){
        int a = 1/0;
        return "hello,a2";
    }
//    @ExceptionHandler(Exception.class)
//    public String e3(Exception e){
//        Result r = new Result();
//        r.setExtra(e.getMessage());
////        return r;
//        return "error";
//    }
}
